<%@ include file="/WEB-INF/jsp/includes.jsp"%>
<%@ include file="/WEB-INF/jsp/header.jsp"%>

<h2>Consentimiento:</h2>
<form:form modelAttribute="consentBean" method="POST">
	<table>
		<thead>
			<th>Nombre</th>
			<th>Apellido</th>
			<th>Numero de historia</th>
		</thead>

		<tr>
			<td>${consentBean.patient.name}
			</td>
			<td>${consentBean.patient.lastName}
			</td>
			<td>${consentBean.patient.history}
			</td>
		</tr>
	</table>


	<table>
		<thead>
			<tr>
				<th>Tratamiento</th>
				<th>Descripcion</th>
				<th>Descripcion especifica</th>
			</tr>
		</thead>
		<c:forEach var="element" items="${consentBean.treatments}" varStatus="status">
			<tr>
				<td>
					${element.id} ${element.name}
				</td>
				<td>
					${element.description}
				</td>
				<td>
					<form:input path="treatments['${status.index}'].specificDescription" size="30" maxlength="80"/>
				</td>
			</tr>
		</c:forEach>
	</table>

	<table>
		<thead>
			<tr>
				<th>Diagnostico</th>
				<th>Descripcion</th>
				<th>Descripcion especifica</th>
			<tr>
		</thead>
		<c:forEach var="element" items="${consentBean.diagnostics}" varStatus="status">
			<tr>
				<td>
					${element.id} ${element.name}
				</td>
				<td>
					${element.description}
				</td>
				<td>
					${element.specificDescription}
					<form:input path="diagnostics['${status.index}'].specificDescription" size="30" maxlength="80"/>
				</td>
			</tr>
		</c:forEach>
	</table>
	
	<table>
		<thead>
			<tr>
				<th>Circunstancias</th>
				<th>Descripcion</th>
				<th>Descripcion especifica</th>
			</tr>
		</thead>
		<c:forEach var="element" items="${consentBean.circunstances}" varStatus="status">
			<tr>
				<td>
					${element.id} ${element.name}
				</td>
				<td>
					${element.description}
				</td>
				<td>
					${element.specificDescription}
					<form:input path="circunstances['${status.index}'].specificDescription" size="30" maxlength="80"/>
				</td>
			</tr>
		</c:forEach>
	</table>
</form:form>
<%@ include file="/WEB-INF/jsp/footer.jsp"%>